GXDrawShape
You can use the GXDrawShape function to draw any shape.
void GXDrawShape(gxShape source);
source
- A reference to the shape object of the shape to draw.
DESCRIPTION
The GXDrawShape function draws the shape referenced by thesource
parameter, taking into account the properties specified in the shape's style, ink, and transform objects. It draws the shape to the display device or devices specified indirectly in the shape's transform object.As part of preparation for drawing, QuickDraw GX makes preliminary calculations and stores the results in caches. You can in some cases speed drawing by having the calculations and cache storage occur ahead of time; you can do that by setting the source shape's
gxCachedShape
attribute or by calling theGXCacheShape
function.ERRORS, WARNINGS, AND NOTICES
In addition to the errors listed below, theGXDrawShape
function can post font-related errors if it is drawing text.
Errors out_of_memory shape_is_nil number_of_contours_exceeds_implementation_limit number_of_points_exceeds_implementation_limit size_of_polygon_exceeds_implementation_limit size_of_path_exceeds_implementation_limit size_of_bitmap_exceeds_implementation_limit pattern_lattice_out_of_range (debugging version) Warnings character_substitution_took_place graphic_type_cannot_be_dashed (debugging version) unable_to_traverse_open_contour_that_starts_or_ends_off_the_curve (debugging version) unable_to_draw_open_contour_that_starts_or_ends_off_the_curve (debugging version) face_override_style_font_must_match_style (debugging version) SEE ALSO
The GXDrawShape function as applied to geometric shapes, and other functions for drawing geometric shapes, are described in the geometric shapes chapter of Inside Macintosh: QuickDraw GX Graphics. The function as applied to typographic shapes, and other functions for drawing typographic shapes, are described in the text shapes, glyph shapes, and layout shapes chapters of Inside Macintosh: QuickDraw GX Typography.Transform objects and their relation to display devices are described in the chapter "Transform Objects" in this book.
The
gxCachedShape
attribute is described in Table 2-4 on page 2-16. TheGXCacheShape
function is described on page 2-62. The differences between the two caching methods are described in the section "Caching Shape Objects" beginning on page 2-27.